#include <iostream>
using namespace std;
int main() {
  string game, str;
  while (cin >> str) game += str;
  auto getScore = [&](int limit) {
    int win = 0, lose = 0;
    for (char &c : game) {
      if (c == 'E') {
        cout << win << ':' << lose << endl;
        return;
      } else if (c == 'W') {
        win++;
      } else {
        lose++;
      }
      if (abs(win - lose) >= 2 && (win >= limit || lose >= limit)) {
        cout << win << ':' << lose << endl;
        win = lose = 0;
      }
    }
  };
  
  getScore(11);
  cout << endl;
  getScore(21);
}